import ReactDOM from 'react-dom/client';
import App from './App';
import 'babel-polyfill';
import 'react-app-polyfill/ie11';
import 'react-app-polyfill/stable';
import './assets/fonts/font.scss';
import 'antd/dist/reset.css';
import '@/style/base.scss';
import '@/style/public.scss';
import { ConfigProvider } from 'antd';
import type { ThemeConfig } from 'antd';
import store from './store';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { persistStore } from 'redux-persist';
import Utils from './utils/format';
import { AliveScope } from 'react-activation';
(window as any).utils = Utils;
const persistor = persistStore(store);
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
const config: ThemeConfig = {
    token: {
        colorPrimary: 'FF7828',
    },
    components: {
        // DatePicker: {
        //     cellHeight:40,
        // },
    },
};
root.render(
    <Provider store={store}>
        {/* <React.StrictMode> */}
        <PersistGate loading={null} persistor={persistor}>
            <ConfigProvider theme={config}>
                <AliveScope>
                    <App />
                </AliveScope>
            </ConfigProvider>
        </PersistGate>
        {/* </React.StrictMode> */}
    </Provider>
);
